---
title: Debugging
hide_title: true
---

import {
	AdvancedMarkdown,
	Aside,
	BuildConfigTool,
	Badge,
	BuildinfoIntroduction,
	BuildinfoBuildHelp,
	Card,
	CardGrid,
	Charts,
	Details,
	FileTree,
	GithubActions,
	Icon,
	LinkCard,
	Modal,
	Patchinfo,
	Scriptinfo,
	ScriptVersions,
	Steps,
	TabItem,
	Tabs
} from "/src/components/global.jsx"

:::note
By default the static builds are built with the debug symbols stripped out to reduce the file size.
:::

To properly debug a segfault we need to use a build with libtorrent and qBittorrent debug symbols included.

Some reasons I don't release them here:
- static builds using `b2` the libtorrent debug symbols can add 100MB to the file size.
- static builds using `cmake` are about 15MB larger and potentially slower.
- It doubles the build time.
- It's not needed for most users.

The easiest way to get a debug build is to build it yourself by

- [forking the repo](https://github.com/userdocs/qbittorrent-nox-static/fork) the repo and running the `ci-main-reusable-caller.yml` workflow with the debug flag enabled.

	![](/qbittorrent-nox-static/docs_images/reusable_workflow_inputs-debug.png)

	:::tip
	The builds will be uploaded as artifacts to the workflow run and can be downloaded from there.
	:::

- Build it yourself locally

	This can be done when building locally by using the `-d` flag or `export qbt_build_debug=on`

Then you will have a debug build with the debug symbols included to get a stack traces using [gdb](https://www.gnu.org/software/gdb/).
